package com.victualler.business.inventory.controller;

import com.victualler.business.inventory.dto.GoodsModelInventoryDto;
import com.victualler.business.inventory.dto.GoodsModelInventoryScanDto;
import com.victualler.core.base.controller.BaseRestController;
import com.victualler.business.inventory.entity.GoodsInventoryDao;
import com.victualler.business.inventory.repository.GoodsInventoryQueryRepository;
import com.victualler.business.inventory.repository.GoodsInventoryRepository;
import com.victualler.business.inventory.service.GoodsInventoryService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * @author: Guoshichang
 * @discription:
 */
@RestController
@RequestMapping("/business/inventory")
public interface GoodsInventoryController  extends BaseRestController<GoodsInventoryDao,GoodsInventoryRepository,GoodsInventoryQueryRepository,GoodsInventoryService> {

    /**
     * 获取商品型号对应的库存
     * @param goodsId 商品id
     * @return GoodsModelInventoryDto
     */
    @RequestMapping("/getGoodsModelInventory/{goodsId}")
    public List<GoodsModelInventoryDto> getGoodsModelInventory(@PathVariable("goodsId") Long goodsId);

    /**
     * 获取商品型号对应的库存
     * @param barCode 条形码
     * @return GoodsModelInventoryDto
     */
    @RequestMapping("/getGoodsModelInventoryScan/{barCode}")
    public GoodsModelInventoryScanDto getGoodsModelInventoryScan(@PathVariable("barCode") String barCode);
}
